#!/bin/bash

# 需要安装 ssl
# sudo apt install libssl-dev -y

script_dir=$(dirname $(realpath $0))
source "${script_dir}/check-toolchain"
source "${script_dir}/config"

echo -e "\033[42m\t\tStart build u-boot\033[0m"
echo "uboot: ${uboot}"


check-toolchain make
check-toolchain gcc
check-toolchain bison
check-toolchain flex


cd $uboot
make ARCH=$arch CROSS_COMPILE=$cross_compile vexpress_ca9x4_defconfig
make ARCH=$arch CROSS_COMPILE=$cross_compile -j $cpu_core
